package com.chrhc.projects.cpub.gen.xml;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

import org.apache.log4j.Logger;

public class IbatisConfigTableBean
{
    
    static final Logger log = Logger.getLogger(IbatisConfigTableBean.class);
    
    private String tableName;
    
    private String domainObjectName;
    
    private String entityPackage;
    
    private String controllerMatchUrl;
    
    private String enableGenerateController;
    
    private String enableGenerateService;
    
    private String enableGenerateView;// js html jsp
    
    /**
     * 获取 enableGenerateView
     * 
     * @return 返回 enableGenerateView
     */
    public String getEnableGenerateView()
    {
        return enableGenerateView;
    }
    
    /**
     * 设置 enableGenerateView
     * 
     * @param 对enableGenerateView进行赋值
     */
    public void setEnableGenerateView(String enableGenerateView)
    {
        this.enableGenerateView = enableGenerateView;
    }
    
    private String title;
    
    public String getTitle()
    {
        return title;
    }
    
    public void setTitle(String title)
    {
        this.title = title;
    }
    
    public String getEntityPackage()
    {
        return entityPackage;
    }
    
    public void setEntityPackage(String entityPackage)
    {
        this.entityPackage = entityPackage;
    }
    
    public String getEnableGenerateService()
    {
        return enableGenerateService;
    }
    
    /**
     * 获取 controllerMatchUrl
     * 
     * @return 返回 controllerMatchUrl
     */
    public String getControllerMatchUrl()
    {
        return controllerMatchUrl;
    }
    
    /**
     * 设置 controllerMatchUrl
     * 
     * @param 对controllerMatchUrl进行赋值
     */
    public void setControllerMatchUrl(String controllerMatchUrl)
    {
        this.controllerMatchUrl = controllerMatchUrl;
    }
    
    public void setEnableGenerateService(String enableGenerateService)
    {
        this.enableGenerateService = enableGenerateService;
    }
    
    /**
     * 获取 enableGenerateController
     * 
     * @return 返回 enableGenerateController
     */
    public String getEnableGenerateController()
    {
        return enableGenerateController;
    }
    
    /**
     * 设置 enableGenerateController
     * 
     * @param 对enableGenerateController进行赋值
     */
    public void setEnableGenerateController(String enableGenerateController)
    {
        this.enableGenerateController = enableGenerateController;
    }
    
    private List<IbatisConfigColumn> columns;
    
    private Map<String, IbatisConfigColumn> columnsMap = new HashMap();;
    
    public String getTableName()
    {
        return tableName;
    }
    
    public void setTableName(String tableName)
    {
        this.tableName = tableName;
    }
    
    public String getDomainObjectName()
    {
        return domainObjectName;
    }
    
    public void setDomainObjectName(String domainObjectName)
    {
        this.domainObjectName = domainObjectName;
    }
    
    public List<IbatisConfigColumn> getColumns()
    {
        return columns;
    }
    
    public void setColumns(List<IbatisConfigColumn> columns)
    {
        this.columns = columns;
        if (columnsMap != null && columns != null && columns.size() > 0)
        {
            log.debug("columns.size():" + columns.size());
            for (IbatisConfigColumn col : columns)
            {
                log.debug("col.getName():" + col.getName());
                columnsMap.put(col.getName(), col);
                log.debug("name:" + col.getName());
                log.debug("columnsMap:" + columnsMap);
            }
        }
        log.debug("columnsMap2:" + columnsMap);
    }
    
    public Map<String, IbatisConfigColumn> getColumnsMap()
    {
        return columnsMap;
    }
    
    public void setColumnsMap(Map<String, IbatisConfigColumn> columnsMap)
    {
        this.columnsMap = columnsMap;
    }
}
